import java.util.Scanner;
public class GuessPrice {
	public static void main(String[]args){
		Scanner input=new Scanner(System.in);
		int a=(int)(Math.random()*100);
		int flag=0;
		for(int i=1;i<=10;i++){
			System.out.println("Please guess the price of the goods:");
			int b=input.nextInt();
			flag++;
			if(a==b){
				System.out.println("You are right,the price is: "+a+" you guess "+flag+" times");
				break;
			}else{
				if(b>a){
					System.out.println("You guess is expensive");
				}if(b<a){
					System.out.println("You guess is cheap");
				}
			}
			if(i==10){
				System.out.println("The truly price of the good is: "+a);
			}
		}
	}
}
